<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title>恒星同学 - 只要有了安排，等待便不是煎熬，而是期待。</title><meta name="author" content="hengxingstu"><meta name="copyright" content="hengxingstu"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta property="og:type" content="website">
<meta property="og:title" content="恒星同学">
<meta property="og:url" content="https://hengxingstu.gitee.io/index.html">
<meta property="og:site_name" content="恒星同学">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://wallpapercave.com/uwp/uwp2365506.jpeg">
<meta property="article:author" content="hengxingstu">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://wallpapercave.com/uwp/uwp2365506.jpeg"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://hengxingstu.gitee.io/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"prismjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery@2/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '恒星同学',
  isPost: false,
  isHome: true,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2023-02-21 20:34:44'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 6.1.0"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://wallpapercave.com/uwp/uwp2365506.jpeg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data is-center"><div class="data-item"><a href="/archives/"><div class="headline">文章</div><div class="length-num">36</div></a></div><div class="data-item"><a href="/tags/"><div class="headline">标签</div><div class="length-num">23</div></a></div><div class="data-item"><a href="/categories/"><div class="headline">分类</div><div class="length-num">8</div></a></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 娱乐</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/gallery/"><i class="fa-fw fas fa-images"></i><span> 图库</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/contact/"><i class="fa-fw fa-fw fas fa-comment-dots"></i><span> 留言板</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('https://wallpapercave.com/wp/wp4327161.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">恒星同学</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page group" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 娱乐</span><i class="fas fa-chevron-down"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/gallery/"><i class="fa-fw fas fa-images"></i><span> 图库</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/link/"><i class="fa-fw fas fa-link"></i><span> 友链</span></a></div><div class="menus_item"><a class="site-page" href="/contact/"><i class="fa-fw fa-fw fas fa-comment-dots"></i><span> 留言板</span></a></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">恒星同学</h1><div id="site-subtitle"><span id="subtitle"></span></div><div id="site_social_icons"><a class="social-icon" href="https://github.com/hengxingstu" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:hengxingstu@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left"><a href="/2023/01/10/%E7%BD%91%E7%AB%99%E8%AF%B4%E6%98%8E/" title="Gitee版Blog镜像说明"><img class="post_bg" src="https://s2.loli.net/2023/02/08/phMGaW7wCs8PY4E.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Gitee版Blog镜像说明"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/01/10/%E7%BD%91%E7%AB%99%E8%AF%B4%E6%98%8E/" title="Gitee版Blog镜像说明">Gitee版Blog镜像说明</a><div class="article-meta-wrap"><span class="article-meta"><i class="fas fa-thumbtack sticky"></i><span class="sticky">置顶</span><span class="article-meta-separator">|</span></span><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-01-10T02:41:00.000Z" title="发表于 2023-01-10 10:41:00">2023-01-10</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2023/01/10/%E7%BD%91%E7%AB%99%E8%AF%B4%E6%98%8E/#post-comment"></a><span class="article-meta-label"> 条评论</span></span></div><div class="content">
gitee由于政策原因，会屏蔽关键字，完整版请看GitHub版
恒星同学
证据在此

敏感信息移除
错误信息:
2022&#x2F;06&#x2F;21&#x2F;English&#x2F;words&#x2F;wordsUnit41&#x2F;index.html 可能包含违禁违规内容，请排查调整后再行重试。

</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2023/02/21/code/springMVC%E6%96%87%E6%A1%A3/" title="Spring参考文档"><img class="post_bg" src="https://s2.loli.net/2023/02/21/vdVhPU5RITfrXg4.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Spring参考文档"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/02/21/code/springMVC%E6%96%87%E6%A1%A3/" title="Spring参考文档">Spring参考文档</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-21T12:26:00.000Z" title="发表于 2023-02-21 20:26:00">2023-02-21</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Spring/">Spring</a></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2023/02/21/code/springMVC%E6%96%87%E6%A1%A3/#post-comment"></a><span class="article-meta-label"> 条评论</span></span></div><div class="content">

Author：www.javaboy.org
Version：0.0.1

[TOC]
一、SpringMVC
1.1 引言
java开源框架，Spring Framework的一个独立模块。
MVC框架,在项目中开辟MVC层次架构    
对控制器中的功能 包装 简化 扩展践行工厂模式，功能架构在工厂之上

1.2 MVC架构1.2.1 概念


名称
职责



Model
模型：即业务模型，负责完成业务中的数据通信处理，对应项目中的 service和dao


View
视图：渲染数据，生成页面。对应项目中的Jsp


Controller
控制器：直接对接请求，控制MVC流程，调度模型，选择视图。对应项目中的Servlet


1.2.2 好处

MVC是现下软件开发中的最流行的代码结构形态;

人们根据负责的不同逻辑，将项目中的代码分成 M V C 3个层次;

层次内部职责单一，层次之间耦合度低;

符合低耦合 高内聚的设计理念。也实际有利于项目的长期维护。



二、开发流程
2.1 导入依赖&lt;dependency>
    &lt;groupId>org.sp ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2023/02/16/code/SpringMVC%E7%AC%94%E8%AE%B0/" title="SpringMVC学习笔记"><img class="post_bg" src="https://s2.loli.net/2023/02/16/N8E1LGTUnYVdmPk.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="SpringMVC学习笔记"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/02/16/code/SpringMVC%E7%AC%94%E8%AE%B0/" title="SpringMVC学习笔记">SpringMVC学习笔记</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-16T09:06:00.000Z" title="发表于 2023-02-16 17:06:00">2023-02-16</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/SpringMVC/">SpringMVC</a></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2023/02/16/code/SpringMVC%E7%AC%94%E8%AE%B0/#post-comment"></a><span class="article-meta-label"> 条评论</span></span></div><div class="content">
springMVC简单案例创建工程后，先添加依赖
&lt;dependencies>
    &lt;dependency>
        &lt;groupId>org.springframework&lt;/groupId>
        &lt;artifactId>spring-webmvc&lt;/artifactId>
        &lt;version>5.3.20&lt;/version>
    &lt;/dependency>
    &lt;properties>
        &lt;!--指定Java版本-->
        &lt;maven.compiler.source>1.8&lt;/maven.compiler.source>
        &lt;maven.compiler.target>1.8&lt;/maven.compiler.target>
    &lt;/properties>
&lt;/dependencies>

并添加&lt;packaging&gt;war&lt;/packaging&gt;，这是为了告诉ide ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2023/02/16/code/Spring%E4%BA%8B%E5%8A%A1/" title="Spring学习笔记"><img class="post_bg" src="https://s2.loli.net/2023/02/16/N8E1LGTUnYVdmPk.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Spring学习笔记"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/02/16/code/Spring%E4%BA%8B%E5%8A%A1/" title="Spring学习笔记">Spring学习笔记</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-16T09:06:00.000Z" title="发表于 2023-02-16 17:06:00">2023-02-16</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Spring/">Spring</a></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2023/02/16/code/Spring%E4%BA%8B%E5%8A%A1/#post-comment"></a><span class="article-meta-label"> 条评论</span></span></div><div class="content">
事务事务的重要性不言而喻，Spring 对事务也提供了非常丰富的支持，各种支持的属性应有尽有。
然而很多小伙伴知道，这里有两个属性特别绕：

隔离性
传播性

事务是什么数据库事务是指作为单个逻辑工作单元执行的一系列操作，这些操作要么一起成功，要么一起失败，是一个不可分割的工作单元。在我们日常工作中，涉及到事务的场景非常多，一个 service 中往往需要调用不同的 dao 层方法，这些方法要么同时成功要么同时失败，我们需要在 service 层确保这一点。
说到事务最典型的案例就是转账了：

张三要给李四转账 500 块钱，这⾥涉及到两个操作，从张三的账户上减去 500 块钱，给李四的账户添加 500 块钱，这两个操作要么同时成功要么同时失败，如何确保他们同时成功或者同时失败呢？答案就是事务。

事务有四大特性（ACID）：


&#x3D;&#x3D;原子性（Atomicity）&#x3D;&#x3D;： 一个事务（transaction）中的所有操作，要么全部完成，要么全部不完成，不会结束在中间某个环节。事务在执行过程中发生错误，会被回滚（Rollback）到事务开始前的状态， ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2023/02/15/code/SpringAop%E7%AC%94%E8%AE%B0/" title="SpringAOP笔记"><img class="post_bg" src="https://s2.loli.net/2023/02/08/jWNelFA4c7BGkTw.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="SpringAOP笔记"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/02/15/code/SpringAop%E7%AC%94%E8%AE%B0/" title="SpringAOP笔记">SpringAOP笔记</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-15T13:00:00.000Z" title="发表于 2023-02-15 21:00:00">2023-02-15</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Spring/">Spring</a></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2023/02/15/code/SpringAop%E7%AC%94%E8%AE%B0/#post-comment"></a><span class="article-meta-label"> 条评论</span></span></div><div class="content">动态代理面向切面编程。
在项目运行的时候，在不改变已有代码的情况下，自动的向方法中添加新的功能。
AOP 的本质实际上就是动态代理。
Java 代理：

静态代理
动态代理：
JDK
CGLIB



JDK 动态代理：
/**
 * 1. JDK 动态代理
 * - 代理的工具，都是 JDK 自己提供的，不需要额外的 jar
 * - JDK 只能代理有接口的类，没有接口的类，是代理不了的
 * 2. CGLIB 动态代理
 */
public class MainDemo01 &#123;
    public static void main(String[] args) &#123;
        //创建一个计算器对象
        final CaculatorImpl caculatorImpl = new CaculatorImpl();
        //创建一个代理对象，需要三个参数，分别是
        //1.类加载器
        //2.这个方法返回的是一个代理对象，第二参数是指这个返回的代理对象实现了哪个接口
        //3.代理对象的处 ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2023/02/12/code/Spring%E7%AC%94%E8%AE%B0/" title="Spring学习笔记"><img class="post_bg" src="https://s2.loli.net/2023/02/12/ukqiYOMfcU4WwCJ.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Spring学习笔记"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/02/12/code/Spring%E7%AC%94%E8%AE%B0/" title="Spring学习笔记">Spring学习笔记</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-12T05:58:00.000Z" title="发表于 2023-02-12 13:58:00">2023-02-12</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Spring/">Spring</a></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2023/02/12/code/Spring%E7%AC%94%E8%AE%B0/#post-comment"></a><span class="article-meta-label"> 条评论</span></span></div><div class="content">
Spring一、引言
1.1 原生web开发中存在哪些问题？

传统Web开发存在硬编码所造成的过度程序耦合（例如：Service中作为属性Dao对象）。

部分Java EE API较为复杂，使用效率低（例如：JDBC开发步骤）。

侵入性强，移植性差（例如：DAO实现的更换，从Connection到SqlSession）。



二、Spring框架
2.1 概念

Spring是一个项目管理框架，同时也是一套Java EE解决方案。

Spring是众多优秀设计模式的组合（工厂、单例、代理、适配器、包装器、观察者、模板、策略）。

Spring并未替代现有框架产品，而是将众多框架进行有机整合，简化企业级开发，俗称”胶水框架”。



2.2 访问与下载
官方网站：https://spring.io/
下载地址：http://repo.spring.io/release/org/springframework/spring/

2.3 Spring架构组成

Spring架构由诸多模块组成，可分类为

核心技术：**依赖注入，事件，资源，i18n，验证，数据绑定，类型转换，SpE ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2023/02/11/code/Java%E6%B3%9B%E5%9E%8B/" title="Java高级-泛型与File"><img class="post_bg" src="https://s2.loli.net/2023/02/11/uEfAp3VrQq7KDWd.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Java高级-泛型与File"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/02/11/code/Java%E6%B3%9B%E5%9E%8B/" title="Java高级-泛型与File">Java高级-泛型与File</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-11T11:54:00.000Z" title="发表于 2023-02-11 19:54:00">2023-02-11</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Java/">Java</a></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2023/02/11/code/Java%E6%B3%9B%E5%9E%8B/#post-comment"></a><span class="article-meta-label"> 条评论</span></span></div><div class="content">
本篇讲解java集合
泛型为什么要有泛型集合容器类在设计阶段、声明阶段不能确定这个容器到底实际存的是什么类型的对象，所以在JDK1.5之前只能把元素类型设计为Object，JDK1.5之后使用泛型来解决。因为这个时候除了元素的类型不确定，其他的部分是确定的，例如关于这个元素如何保存，如何管理等是确定的。
因此此时把元素的类型设计成一个参数，这个类型参数叫做泛型。Collection&lt;E&gt;，List&lt;E&gt;，ArrayList&lt;E&gt; 这个&lt;E&gt;就是类型参数，即泛型。
//在集合中使用泛型之前的情况：
@Test
public void test1()&#123;
    ArrayList list = new ArrayList();
    //需求：存放学生的成绩
    list.add(78);
    list.add(76);
    list.add(89);
    list.add(88);
    //问题一：类型不安全
    //        list.add("Tom");
    for(Object sco ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2023/02/10/code/Java%E9%9B%86%E5%90%88(%E4%B8%8B)/" title="Java高级-集合-Map部分"><img class="post_bg" src="https://cdn.jsdelivr.net/gh/hengxingstu/Blog-img/mc/00f3e6da1f364172c08d6dc6ddb4a077e.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Java高级-集合-Map部分"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/02/10/code/Java%E9%9B%86%E5%90%88(%E4%B8%8B)/" title="Java高级-集合-Map部分">Java高级-集合-Map部分</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-10T06:46:00.000Z" title="发表于 2023-02-10 14:46:00">2023-02-10</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Java/">Java</a></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2023/02/10/code/Java%E9%9B%86%E5%90%88(%E4%B8%8B)/#post-comment"></a><span class="article-meta-label"> 条评论</span></span></div><div class="content">
本篇讲解java集合
Map
|----Map:双列数据，存储key-value对的数据   ---类似于高中的函数：y = f(x)
	|----HashMap:作为Map的主要实现类；线程不安全的，效率高；存储null的key和value
		|----LinkedHashMap:保证在遍历map元素时，可以按照添加的顺序实现遍历。
					原因：在原有的HashMap底层结构基础上，添加了一对指针，指向前一个和后一个元素。
					对于频繁的遍历操作，此类执行效率高于HashMap。
	|----TreeMap:保证按照添加的key-value对进行排序，实现排序遍历。此时考虑key的自然排序或定制排序
		底层使用红黑树
	|----Hashtable:作为古老的实现类；线程安全的，效率低；不能存储null的key和value
		|----Properties:常用来处理配置文件。key和value都是String类型

HashMap的底层：

数组+链表  （JDK7.0及之前）


               数组+链表+红黑树 （JDK8.0）



Map结 ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2023/02/08/code/Java%E9%9B%86%E5%90%88(%E4%B8%8A)/" title="Java高级-集合-Collection部分"><img class="post_bg" src="https://cdn.jsdelivr.net/gh/hengxingstu/Blog-img/mc/00f3e6da1f364172c08d6dc6ddb4a077e.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Java高级-集合-Collection部分"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/02/08/code/Java%E9%9B%86%E5%90%88(%E4%B8%8A)/" title="Java高级-集合-Collection部分">Java高级-集合-Collection部分</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-08T08:00:00.000Z" title="发表于 2023-02-08 16:00:00">2023-02-08</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Java/">Java</a></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2023/02/08/code/Java%E9%9B%86%E5%90%88(%E4%B8%8A)/#post-comment"></a><span class="article-meta-label"> 条评论</span></span></div><div class="content">
本篇讲解java集合
集合集合框架的概述
集合、数组都是对多个数据进行存储操作的结构，简称Java容器。
说明：此时的存储，主要指的是内存层面的存储，不涉及到持久化的存储（.txt,.jpg,.avi，数据库中）

数组的缺陷

数组在存储多个数据方面的特点

一旦初始化以后，其长度就确定了。
数组一旦定义好，其元素的类型也就确定了。我们也就只能操作指定类型的数据了。


数组在存储多个数据方面的缺点

一旦初始化以后，其长度就不可修改。

数组中提供的方法非常有限，对于添加、删除、插入数据等操作，非常不便，同时效率不高。

获取数组中实际元素的个数的需求，数组没有现成的属性或方法可用

数组存储数据的特点：有序、可重复。对于无序、不可重复的需求，不能满足。






Java 集合可分为 Collection 和 Map 两种体系
Collection|----Collection接口：单列集合，用来存储一个一个的对象
         |----List接口：存储有序的、可重复的数据。  -->“动态”数组
             |----ArrayList、LinkedL ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2023/02/07/code/Java%E6%9E%9A%E4%B8%BE%E7%B1%BB%E4%B8%8E%E6%B3%A8%E8%A7%A3/" title="Java高级-枚举类与注解"><img class="post_bg" src="https://s2.loli.net/2023/02/08/PQEkKusxfo9HqCe.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Java高级-枚举类与注解"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/02/07/code/Java%E6%9E%9A%E4%B8%BE%E7%B1%BB%E4%B8%8E%E6%B3%A8%E8%A7%A3/" title="Java高级-枚举类与注解">Java高级-枚举类与注解</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-07T07:57:00.000Z" title="发表于 2023-02-07 15:57:00">2023-02-07</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Java/">Java</a></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2023/02/07/code/Java%E6%9E%9A%E4%B8%BE%E7%B1%BB%E4%B8%8E%E6%B3%A8%E8%A7%A3/#post-comment"></a><span class="article-meta-label"> 条评论</span></span></div><div class="content">
本篇讲解java枚举类与注解
枚举类枚举类的理解：类的对象只有有限个，确定的。我们称此类为枚举类
当需要定义一组常量时，强烈建议使用枚举类
如果枚举类中只有一个对象，则可以作为单例模式的实现方式。
如何定义枚举类JDK5.0前-自定义枚举类//使用自定义枚举类
class Status&#123;
    //1.声明Season对象的属性:private final修饰
    private final String statusName;
    private final String statusDesc;

    //2.私有化类的构造器,并给对象属性赋值
    private Status(String statusName, String statusDesc) &#123;
        this.statusName = statusName;
        this.statusDesc = statusDesc;
    &#125;

    //3.提供当前枚举类的多个对象：public static final的
    public stati ...</div></div></div><div class="recent-post-item"><div class="post_cover left"><a href="/2023/02/03/code/Java%E5%B8%B8%E7%94%A8%E7%B1%BB/" title="Java高级-常用类-String、Date、Compare、Other"><img class="post_bg" src="https://s2.loli.net/2023/02/03/uwhRQAO6rqZgWVi.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Java高级-常用类-String、Date、Compare、Other"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/02/03/code/Java%E5%B8%B8%E7%94%A8%E7%B1%BB/" title="Java高级-常用类-String、Date、Compare、Other">Java高级-常用类-String、Date、Compare、Other</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-02-03T03:55:00.000Z" title="发表于 2023-02-03 11:55:00">2023-02-03</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Java/">Java</a></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2023/02/03/code/Java%E5%B8%B8%E7%94%A8%E7%B1%BB/#post-comment"></a><span class="article-meta-label"> 条评论</span></span></div><div class="content">
本篇讲解java常用类
String类String:字符串，使用一对””引起来表示。

String类被声明为final的，不可被继承。

String实现了Serializable接口：表示字符串是支持序列化的。
​         实现了Comparable接口：表示String可以比较大小

String内部定义了final char[] value用于存储字符串数据

String:代表不可变的字符序列。简称：不可变性。
体现：

当对字符串重新赋值时，需要重新指定内存区域赋值，不能使用原有的value进行赋值。
当对现有的字符串进行连接操作时，同上。
当调用String的replace()方法修改指定字符或字符串时，同上。


通过字面量的方式（区别于new）给一个字符串赋值，此时的字符串值声明在字符串常量池中。

字符串常量池中是不会存储相同内容的字符串的。


String的实例化方式：
方式一：通过字面量定义的方式，如下图左
方式二：通过new + 构造器的方式，如下图右


面试题：String s &#x3D; new String(“abc”);方式创建对象，在 ...</div></div></div><div class="recent-post-item"><div class="post_cover right"><a href="/2023/01/30/code/JavaThread/" title="Java高级-多线程"><img class="post_bg" src="https://s2.loli.net/2023/01/31/TyPcrql46CJWB8D.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Java高级-多线程"></a></div><div class="recent-post-info"><a class="article-title" href="/2023/01/30/code/JavaThread/" title="Java高级-多线程">Java高级-多线程</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-01-30T10:34:00.000Z" title="发表于 2023-01-30 18:34:00">2023-01-30</time></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/Java/">Java</a></span><span class="article-meta"><span class="article-meta-separator">|</span><i class="fas fa-comments"></i><a class="twikoo-count" href="/2023/01/30/code/JavaThread/#post-comment"></a><span class="article-meta-label"> 条评论</span></span></div><div class="content">
本篇讲解java多线程
基本概念： 程序、进程、线程**程序(program)**是为完成特定任务、用某种语言编写的一组指令的集合。即指一段静态的代码，静态对象。  
**进程(process)**是程序的一次执行过程，或是正在运行的一个程序。是一个动态的过程：有它自身的产生、存在和消亡的过程。 ——生命周期  


如：运行中的QQ，运行中的MP3播放器
程序是静态的，进程是动态的
进程作为资源分配的单位， 系统在运行时会为每个进程分配不同的内存区域


**线程(thread)**，进程可进一步细化为线程，是一个程序内部的一条执行路径。  

若一个进程同一时间并行执行多个线程，就是支持多线程的
线程作为调度和执行的单位，每个线程拥有独立的运行栈和程序计数器(pc)，线程切换的开销小
一个进程中的多个线程共享相同的内存单元&#x2F;内存地址空间 –&gt; 它们从同一堆中分配对象，可以访问相同的变量和对象。这就使得线程间通信更简便、高效。但多个线程操作共享的系统资源可能就会带来安全的隐患。  


单核CPU和多核CPU的理解
单核CPU，其实是一种假的多线程，因为在一个时间单 ...</div></div></div><nav id="pagination"><div class="pagination"><span class="page-number current">1</span><a class="page-number" href="/page/2/#content-inner">2</a><a class="page-number" href="/page/3/#content-inner">3</a><a class="extend next" rel="next" href="/page/2/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src="https://wallpapercave.com/uwp/uwp2365506.jpeg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">hengxingstu</div><div class="author-info__description"></div></div><div class="card-info-data is-center"><div class="card-info-data-item"><a href="/archives/"><div class="headline">文章</div><div class="length-num">36</div></a></div><div class="card-info-data-item"><a href="/tags/"><div class="headline">标签</div><div class="length-num">23</div></a></div><div class="card-info-data-item"><a href="/categories/"><div class="headline">分类</div><div class="length-num">8</div></a></div></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/hengxingstu"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/hengxingstu" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="mailto:hengxingstu@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">这是我的博客，欢迎和我联系，交流是最好的老师</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2023/02/21/code/springMVC%E6%96%87%E6%A1%A3/" title="Spring参考文档"><img src="https://s2.loli.net/2023/02/21/vdVhPU5RITfrXg4.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Spring参考文档"/></a><div class="content"><a class="title" href="/2023/02/21/code/springMVC%E6%96%87%E6%A1%A3/" title="Spring参考文档">Spring参考文档</a><time datetime="2023-02-21T12:26:00.000Z" title="发表于 2023-02-21 20:26:00">2023-02-21</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/02/16/code/SpringMVC%E7%AC%94%E8%AE%B0/" title="SpringMVC学习笔记"><img src="https://s2.loli.net/2023/02/16/N8E1LGTUnYVdmPk.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="SpringMVC学习笔记"/></a><div class="content"><a class="title" href="/2023/02/16/code/SpringMVC%E7%AC%94%E8%AE%B0/" title="SpringMVC学习笔记">SpringMVC学习笔记</a><time datetime="2023-02-16T09:06:00.000Z" title="发表于 2023-02-16 17:06:00">2023-02-16</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/02/16/code/Spring%E4%BA%8B%E5%8A%A1/" title="Spring学习笔记"><img src="https://s2.loli.net/2023/02/16/N8E1LGTUnYVdmPk.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Spring学习笔记"/></a><div class="content"><a class="title" href="/2023/02/16/code/Spring%E4%BA%8B%E5%8A%A1/" title="Spring学习笔记">Spring学习笔记</a><time datetime="2023-02-16T09:06:00.000Z" title="发表于 2023-02-16 17:06:00">2023-02-16</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/02/15/code/SpringAop%E7%AC%94%E8%AE%B0/" title="SpringAOP笔记"><img src="https://s2.loli.net/2023/02/08/jWNelFA4c7BGkTw.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="SpringAOP笔记"/></a><div class="content"><a class="title" href="/2023/02/15/code/SpringAop%E7%AC%94%E8%AE%B0/" title="SpringAOP笔记">SpringAOP笔记</a><time datetime="2023-02-15T13:00:00.000Z" title="发表于 2023-02-15 21:00:00">2023-02-15</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2023/02/12/code/Spring%E7%AC%94%E8%AE%B0/" title="Spring学习笔记"><img src="https://s2.loli.net/2023/02/12/ukqiYOMfcU4WwCJ.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Spring学习笔记"/></a><div class="content"><a class="title" href="/2023/02/12/code/Spring%E7%AC%94%E8%AE%B0/" title="Spring学习笔记">Spring学习笔记</a><time datetime="2023-02-12T05:58:00.000Z" title="发表于 2023-02-12 13:58:00">2023-02-12</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Java/"><span class="card-category-list-name">Java</span><span class="card-category-list-count">13</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Learn/"><span class="card-category-list-name">Learn</span><span class="card-category-list-count">6</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Markdown/"><span class="card-category-list-name">Markdown</span><span class="card-category-list-count">6</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/Spring/"><span class="card-category-list-name">Spring</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/SpringBoot/"><span class="card-category-list-name">SpringBoot</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/SpringMVC/"><span class="card-category-list-name">SpringMVC</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/web/"><span class="card-category-list-name">web</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E7%BC%96%E7%A8%8B%E6%96%87%E6%A1%A3/"><span class="card-category-list-name">编程文档</span><span class="card-category-list-count">1</span></a></li>
            </ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/tags/Angular/" style="font-size: 1.1em; color: #999">Angular</a> <a href="/tags/DataStructure/" style="font-size: 1.1em; color: #999">DataStructure</a> <a href="/tags/Java/" style="font-size: 1.5em; color: #99a9bf">Java</a> <a href="/tags/Java-JPA/" style="font-size: 1.1em; color: #999">Java JPA</a> <a href="/tags/Servlet/" style="font-size: 1.1em; color: #999">Servlet</a> <a href="/tags/Spring/" style="font-size: 1.34em; color: #99a3b0">Spring</a> <a href="/tags/SpringBoot/" style="font-size: 1.18em; color: #999ca1">SpringBoot</a> <a href="/tags/SpringMVC/" style="font-size: 1.1em; color: #999">SpringMVC</a> <a href="/tags/TypeScript/" style="font-size: 1.1em; color: #999">TypeScript</a> <a href="/tags/angular/" style="font-size: 1.1em; color: #999">angular</a> <a href="/tags/web/" style="font-size: 1.1em; color: #999">web</a> <a href="/tags/%E5%85%AC%E5%BC%8F/" style="font-size: 1.26em; color: #999fa8">公式</a> <a href="/tags/%E5%8D%95%E8%AF%8D/" style="font-size: 1.1em; color: #999">单词</a> <a href="/tags/%E5%90%83%E5%96%9D%E7%8E%A9%E4%B9%90/" style="font-size: 1.1em; color: #999">吃喝玩乐</a> <a href="/tags/%E5%A4%A7%E6%95%B0%E6%8D%AE/" style="font-size: 1.18em; color: #999ca1">大数据</a> <a href="/tags/%E6%97%A5%E5%B8%B8/" style="font-size: 1.1em; color: #999">日常</a> <a href="/tags/%E7%BC%96%E7%A8%8B%E6%8A%80%E5%B7%A7/" style="font-size: 1.1em; color: #999">编程技巧</a> <a href="/tags/%E8%80%83%E7%A0%94/" style="font-size: 1.42em; color: #99a6b7">考研</a> <a href="/tags/%E8%80%83%E7%A0%94%E6%95%B0%E5%AD%A6/" style="font-size: 1.26em; color: #999fa8">考研数学</a> <a href="/tags/%E8%80%83%E7%A0%94%E8%8B%B1%E8%AF%AD/" style="font-size: 1.18em; color: #999ca1">考研英语</a> <a href="/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%9F%A5%E8%AF%86/" style="font-size: 1.1em; color: #999">计算机知识</a> <a href="/tags/%E8%AF%AD%E6%B3%95/" style="font-size: 1.1em; color: #999">语法</a> <a href="/tags/%E8%B6%A3%E9%97%BB/" style="font-size: 1.1em; color: #999">趣闻</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/02/"><span class="card-archive-list-date">二月 2023</span><span class="card-archive-list-count">10</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2023/01/"><span class="card-archive-list-date">一月 2023</span><span class="card-archive-list-count">11</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/09/"><span class="card-archive-list-date">九月 2022</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/08/"><span class="card-archive-list-date">八月 2022</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/07/"><span class="card-archive-list-date">七月 2022</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/06/"><span class="card-archive-list-date">六月 2022</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/05/"><span class="card-archive-list-date">五月 2022</span><span class="card-archive-list-count">3</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2022/04/"><span class="card-archive-list-date">四月 2022</span><span class="card-archive-list-count">5</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">36</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2023-02-21T12:34:43.941Z"></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2023 By hengxingstu</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">本地搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div id="local-search-results"></div></div></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox.umd.js"></script><script src="/js/search/local-search.js"></script><div class="js-pjax"><script>(() => { 
  const getCommentUrl = () => {
    const eleGroup = document.querySelectorAll('#recent-posts .article-title')
    let urlArray = []
    eleGroup.forEach(i=>{
      urlArray.push(i.getAttribute('href'))
    })
    return urlArray
  }

  const getCount = () => {
    const runTwikoo = () => {
      twikoo.getCommentsCount({
        envId: 'https://twikoo-hengxing.vercel.app/',
        region: '',
        urls: getCommentUrl(),
        includeReply: false
      }).then(function (res) {
        document.querySelectorAll('#recent-posts .twikoo-count').forEach((item,index) => {
          item.innerText = res[index].count
        })
      }).catch(function (err) {
        console.log(err)
      })
    }

      if (typeof twikoo === 'object') {
        runTwikoo()
      } else {
        getScript('https://cdn.jsdelivr.net/npm/twikoo/dist/twikoo.all.min.js').then(runTwikoo)
      }
  }

  window.pjax ? getCount() : window.addEventListener('load', getCount)

})()</script><script>function subtitleType () {
  if (true) { 
    window.typed = new Typed("#subtitle", {
      strings: ["只要有了安排，等待便不是煎熬，而是期待。"],
      startDelay: 300,
      typeSpeed: 150,
      loop: true,
      backSpeed: 50
    })
  } else {
    document.getElementById("subtitle").innerHTML = '只要有了安排，等待便不是煎熬，而是期待。'
  }
}

if (true) {
  if (typeof Typed === 'function') {
    subtitleType()
  } else {
    getScript('https://cdn.jsdelivr.net/npm/typed.js/lib/typed.min.js').then(subtitleType)
  }
} else {
  subtitleType()
}</script></div><script defer="defer" id="fluttering_ribbon" mobile="false" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/canvas-fluttering-ribbon.min.js"></script><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/activate-power-mode.min.js"></script><script>POWERMODE.colorful = true;
POWERMODE.shake = false;
POWERMODE.mobile = true;
document.body.addEventListener('input', POWERMODE);
</script><script id="click-heart" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc@1/dist/click-heart.min.js" async="async" mobile="true"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"debug":false,"model":{"scale":1,"hHeadPos":0.5,"vHeadPos":0.618,"jsonPath":"/live2dw/assets/haru02.model.json"},"display":{"superSample":2,"width":200,"height":400,"position":"right","hOffset":10,"vOffset":0},"mobile":{"show":false,"scale":0.5},"react":{"opacityDefault":0.7,"opacityOnHover":0.2},"dialog":{"enable":true,"hitokoto":true},"log":false});</script></body></html>